package com.tcm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tcm.entity.Teaching;
import com.tcm.entity.dto.param.TeachingUpdateParam;
import com.tcm.entity.vo.TeachingListResult;
import com.tcm.exception.DatabaseOperationException;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 教学管理业务接口
 * @author Guqier
 * @version 1.0
 * @date 2023/7/13 14:49
 */
public interface TeachingService extends IService<Teaching> {
    @Transactional
    boolean addTeaching(TeachingUpdateParam param, Long currUserId) throws Exception;

    @Transactional
    boolean modifyTeaching(TeachingUpdateParam param, Long currUserId);

    @Transactional
    boolean removeTeaching(Long termId, Long bookId, Long teacherId, Long currUserId) throws DatabaseOperationException;

    List<TeachingListResult> getTeachingByFormat(Long termId, Long bookId, Long teacherId, Long clazzId);
}
